<template>
  <div>
    姓名: <input v-model="user.name"  type="text">
    年龄：<input v-model="user.age" type="text">
  </div>
</template>

<script>
export default {


  data() {
    return {
      user : {
        name:'',
        age:''
      }
      
    };
  },
  watch: {
    user: {
      deep:true,
      handler(newValue,oldValue) {
        console.log(newValue,oldValue);

      }

    }
  },
};
</script>

<style lang="scss" scoped>

</style>